﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using YaAppoint.Appointments;
using YaAppoint.Appointments.Schedules;

namespace YaAppoint
{
    /// <summary>
    /// 设备
    /// </summary>
    public class Device : CommonEntity
    {
        /// <summary>
        /// 厂商
        /// </summary>
        [MaxLength(200)]
        public virtual string? Manufacturer { get; set; }

        /// <summary>
        /// 型号
        /// </summary>
        [MaxLength(200)]
        public virtual string? Model { get; set; }

        /// <summary>
        /// AETitle
        /// </summary>
        [MaxLength(500)]
        public virtual string? AeTitle { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public virtual DeviceStatus Status { get; set; } = DeviceStatus.Running;

        /// <summary>
        /// 设备类型
        /// </summary>
        public virtual DeviceType DeviceType { get; set; }

        /// <summary>
        /// 设备类型ID
        /// </summary>
        public virtual Guid DeviceTypeId { get; set; }

        /// <summary>
        /// 科室ID
        /// </summary>
        public virtual Guid DepartmentId { get; set; }

        /// <summary>
        /// 显示复合名称
        /// </summary>
        public virtual bool VisibleCompoundName { get; set; } = true;

        /// <summary>
        /// 诊室Id
        /// </summary>
        public virtual Guid RoomId { get; set; }
        
        /// <summary>
        /// 排班计划
        /// </summary>
        public virtual Guid? ScheduleId { get; set; }

        /// <summary>
        /// 排班计划
        /// </summary>
        public virtual Schedule? Schedule { get; set; }

        /// <summary>
        /// 特殊排班
        /// </summary>
        public virtual List<ScheduleOverride>? ScheduleOverrides { get; set; }
    }
}
